Optimal. Leaf size=31 \[ \sqrt {2} \tanh ^{-1}\left (\frac {\cos (x)}{\sqrt {2} \sqrt {1-\sin (x)} \sqrt {\sin (x)}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2861, 212}
\begin {gather*} \sqrt {2} \tanh ^{-1}\left (\frac {\cos (x)}{\sqrt {2} \sqrt {1-\sin (x)} \sqrt {\sin (x)}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 2861
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {1-\sin (x)} \sqrt {\sin (x)}} \, dx &=-\left (2 \text {Subst}\left (\int \frac {1}{2-x^2} \, dx,x,-\frac {\cos (x)}{\sqrt {1-\sin (x)} \sqrt {\sin (x)}}\right )\right )\\ &=\sqrt {2} \tanh ^{-1}\left (\frac {\cos (x)}{\sqrt {2} \sqrt {1-\sin (x)} \sqrt {\sin (x)}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 4 vs. order 3 in
optimal.
time = 1.29, size = 125, normalized size = 4.03 \begin {gather*} \frac {2 \left (F\left (\left .\sin ^{-1}\left (\frac {1}{\sqrt {\tan \left (\frac {x}{4}\right )}}\right )\right |-1\right )-\Pi \left (-1-\sqrt {2};\left .\sin ^{-1}\left (\frac {1}{\sqrt {\tan \left (\frac {x}{4}\right )}}\right )\right |-1\right )-\Pi \left (-1+\sqrt {2};\left .\sin ^{-1}\left (\frac {1}{\sqrt {\tan \left (\frac {x}{4}\right )}}\right )\right |-1\right )\right ) \sec ^2\left (\frac {x}{4}\right ) \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right ) \sin (x)}{\sqrt {1-\cot ^2\left (\frac {x}{4}\right )} \sqrt {-((-1+\sin (x)) \sin (x))} \tan ^{\frac {3}{2}}\left (\frac {x}{4}\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(51\) vs.
\(2(24)=48\).
time = 0.36, size = 52, normalized size = 1.68
method | result | size |
default | \(-\frac {2 \sqrt {-\frac {-1+\cos \left (x \right )}{\sin \left (x \right )}}\, \left (-1+\cos \left (x \right )+\sin \left (x \right )\right ) \left (\sqrt {\sin }\left (x \right )\right ) \arctanh \left (\sqrt {-\frac {-1+\cos \left (x \right )}{\sin \left (x \right )}}\right )}{\sqrt {1-\sin \left (x \right )}\, \left (-1+\cos \left (x \right )\right )}\) | \(52\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 31, normalized size = 1.00 \begin {gather*} \sqrt {2} \log \left (\frac {\sqrt {2} \sqrt {-\sin \left (x\right ) + 1} \sqrt {\sin \left (x\right )} + \cos \left (x\right )}{\sin \left (x\right ) - 1}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {1 - \sin {\left (x \right )}} \sqrt {\sin {\left (x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 146 vs.
\(2 (24) = 48\).
time = 0.87, size = 146, normalized size = 4.71 \begin {gather*} \frac {\sqrt {2} {\left (\log \left (\tan \left (-\frac {1}{8} \, \pi + \frac {1}{4} \, x\right )^{2} - \sqrt {\tan \left (-\frac {1}{8} \, \pi + \frac {1}{4} \, x\right )^{4} - 6 \, \tan \left (-\frac {1}{8} \, \pi + \frac {1}{4} \, x\right )^{2} + 1} + 1\right ) - \log \left ({\left | -\tan \left (-\frac {1}{8} \, \pi + \frac {1}{4} \, x\right )^{2} + \sqrt {\tan \left (-\frac {1}{8} \, \pi + \frac {1}{4} \, x\right )^{4} - 6 \, \tan \left (-\frac {1}{8} \, \pi + \frac {1}{4} \, x\right )^{2} + 1} + 3 \right |}\right ) - \log \left ({\left | -\tan \left (-\frac {1}{8} \, \pi + \frac {1}{4} \, x\right )^{2} + \sqrt {\tan \left (-\frac {1}{8} \, \pi + \frac {1}{4} \, x\right )^{4} - 6 \, \tan \left (-\frac {1}{8} \, \pi + \frac {1}{4} \, x\right )^{2} + 1} + 1 \right |}\right )\right )}}{2 \, \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, x\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \frac {1}{\sqrt {\sin \left (x\right )}\,\sqrt {1-\sin \left (x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________